class DtoB {
    public static void main(String args[]) {
        int x = 35;
        int a[] = new int[32];//创建数组存储存放二进制数字

        //除2取余
        for (int i = 0; i < 32; i++) {
            a[i] = x % 2;
            x /= 2;
        }

        //逆序排列
        for (int i = a.length - 1; i >= 0; i--)
            System.out.print(a[i]);

    }
}